home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 569 b | 29 lines | [TEXT/ttxt] |
- --<<<
-
- in module InternetFish
-
- -- Connection class
-
- class connection ()
- instance variables
- tcpStream
- host
- port
- client
- mqueue
- end
-
- method init self {object connection} #rest args #key tcpStream: host: port: client: -> (
- apply nextmethod self args
- self.host := host
- self.port := port
- self.client := client
- if tcpStream != unsupplied do
- openConnection self tcpstream
- )
-
- method openConnection self {object connection} tcpStream -> (
- self.tcpStream := tcpStream
- self.mqueue := new MessageQueue fun: handleMessage client: self.client stream: self.tcpStream
- )
-